package com.abs.orm.db.dao.util;

import java.sql.ResultSetMetaData;
import java.sql.SQLException;

import com.ads.orm.db.model.Column;

public class DaoHelper {

	public static void RSMDToColumn(Column column, ResultSetMetaData rsmd, int i) throws SQLException {
		column.setColumnClassName(rsmd.getColumnClassName(i));
		column.setColumnDisplaySize(rsmd.getColumnDisplaySize(i));
		column.setColumnLabel(rsmd.getColumnLabel(i));
		column.setColumnName(rsmd.getColumnName(i));
		column.setColumnType(rsmd.getColumnType(i));
		column.setColumnTypeName(rsmd.getColumnTypeName(i));
		column.setPrecision(rsmd.getPrecision(i));
		column.setScale(rsmd.getScale(i));
		column.setSchemaName(rsmd.getSchemaName(i));
		column.setTableName(rsmd.getTableName(i));
		column.setIsAutoIncrement(rsmd.isAutoIncrement(i));
		column.setIsCaseSensitive(rsmd.isCaseSensitive(i));
		column.setIsCurrency(rsmd.isCurrency(i));
		column.setIsDefinitelyWritable(rsmd.isDefinitelyWritable(i));
		column.setIsNullable(rsmd.isNullable(i));
		column.setIsReadOnly(rsmd.isReadOnly(i));
		column.setIsSearchable(rsmd.isSearchable(i));
		column.setIsSigned(rsmd.isSigned(i));
		column.setIsWritable(rsmd.isWritable(i));
	}
}
